package com.lhy.admin.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户模型
 * </p>
 * @author 86159
 * @date 2021-05-22 16:50:22
 * Copyright (c) 2021 
 */
@Data
@TableName("t_user")
@Schema( description="用户")
public class User implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @Schema(description= "用户名")
    @TableField("name")
    private String name;

    /**
     * 密码
     */
    @Schema(description= "密码")
    @TableField("pass")
    private String pass;

    /**
     * 昵称姓名
     */
    @Schema(description= "昵称姓名")
    @TableField("nick")
    private String nick;

    /**
     * 头像
     */
    @Schema(description= "头像")
    @TableField("avatar")
    private String avatar;

    /**
     * 邮箱
     */
    @Schema(description= "邮箱")
    @TableField("email")
    private String email;

    /**
     * 手机号
     */
    @Schema(description= "手机号")
    @TableField("phone")
    private String phone;

    /**
     * 角色ID
     */
    @Schema(description= "角色ID")
    @TableField("role_id")
    private Integer roleId;

    /**
     * 所属部门
     */
    @Schema(description= "所属部门")
    @TableField("department_id")
    private Integer departmentId;

    /**
     * 性别0-女,1-男
     */
    @Schema(description= "性别0-女,1-男")
    @TableField("gender")
    private Integer gender;

    /**
     * 用户状态
     */
    @Schema(description= "用户状态")
    @TableField("status")
    private Integer status;

    /**
     * 生日
     */
    @Schema(description= "生日")
    @TableField("birthday")
    private LocalDateTime birthday;

    /**
     * 最近访问时间
     */
    @Schema(description= "最近访问时间")
    @TableField("visited")
    private LocalDateTime visited;

    /**
     * 创建时间
     */
    @Schema(description= "创建时间")
    @TableField("created")
    private LocalDateTime created;

    /**
     * 更新时间
     */
    @Schema(description= "更新时间")
    @TableField("updated")
    private LocalDateTime updated;


    public static final String ID = "id";
    public static final String NAME = "name";
    public static final String PASS = "pass";
    public static final String NICK = "nick";
    public static final String AVATAR = "avatar";
    public static final String EMAIL = "email";
    public static final String PHONE = "phone";
    public static final String ROLE_ID = "role_id";
    public static final String DEPARTMENT_ID = "department_id";
    public static final String GENDER = "gender";
    public static final String STATUS = "status";
    public static final String BIRTHDAY = "birthday";
    public static final String VISITED = "visited";
    public static final String CREATED = "created";
    public static final String UPDATED = "updated";

}
